// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PLAN_APPLICATION
// * CreateDate    : 2011-8-11 20:46:48
// * Creater       : CodeSmith
// * LastChangeDate: 2011-8-11 20:46:48
// * LastChanger   : 2011-8-11 20:46:48
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class ProdPlanApplicationEntity : EntityBase
    {
        public ProdPlanApplicationTable TableSchema
        {
            get
            {
                return ProdPlanApplicationTable.Current;
            }
		}
		
		public ProdPlanApplicationEntity()
        {

        }
		
		public ProdPlanApplicationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_CODE"]));
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.MaintainOrderId = Convert.ToString(CommonFunctions.ToObject(dr["MAINTAIN_ORDER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.DepartmentId = Convert.ToString(CommonFunctions.ToObject(dr["DEPARTMENT_ID"]));
			this.ApplicationPerson = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_PERSON"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
			this.DeliveryPlace = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE"]));
			this.DeliveryPlaceZipcode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE_ZIPCODE"]));
			this.TrasportType = Convert.ToString(CommonFunctions.ToObject(dr["TRASPORT_TYPE"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedPhone = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PHONE"]));
			this.ApplicationType = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_TYPE"]));
			this.ProductTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_ID"]));
			this.DeliveryType = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_TYPE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public ProdPlanApplicationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_CODE"]));
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.MaintainOrderId = Convert.ToString(CommonFunctions.ToObject(dr["MAINTAIN_ORDER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.DepartmentId = Convert.ToString(CommonFunctions.ToObject(dr["DEPARTMENT_ID"]));
			this.ApplicationPerson = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_PERSON"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
			this.DeliveryPlace = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE"]));
			this.DeliveryPlaceZipcode = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_PLACE_ZIPCODE"]));
			this.TrasportType = Convert.ToString(CommonFunctions.ToObject(dr["TRASPORT_TYPE"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedPhone = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PHONE"]));
			this.ApplicationType = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_TYPE"]));
			this.ProductTypeId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TYPE_ID"]));
			this.DeliveryType = Convert.ToString(CommonFunctions.ToObject(dr["DELIVERY_TYPE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPlanApplicationTable.Current;
            }
        }
		
		#region Perporty List
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_APPLICATION_ID)); }
            set { SetData(ProdPlanApplicationTable.C_APPLICATION_ID, value); }
        }
		
        public string ApplicationCode
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_APPLICATION_CODE)); }
            set { SetData(ProdPlanApplicationTable.C_APPLICATION_CODE, value); }
        }
		
        public string OrderId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_ORDER_ID)); }
            set { SetData(ProdPlanApplicationTable.C_ORDER_ID, value); }
        }
		
        public string MaintainOrderId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_MAINTAIN_ORDER_ID)); }
            set { SetData(ProdPlanApplicationTable.C_MAINTAIN_ORDER_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_CUSTOMER_ID)); }
            set { SetData(ProdPlanApplicationTable.C_CUSTOMER_ID, value); }
        }
		
        public string DepartmentId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_DEPARTMENT_ID)); }
            set { SetData(ProdPlanApplicationTable.C_DEPARTMENT_ID, value); }
        }
		
        public string ApplicationPerson
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_APPLICATION_PERSON)); }
            set { SetData(ProdPlanApplicationTable.C_APPLICATION_PERSON, value); }
        }
		
        public string PaymentType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_PAYMENT_TYPE)); }
            set { SetData(ProdPlanApplicationTable.C_PAYMENT_TYPE, value); }
        }
		
        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationTable.C_DELIVERY_DATE)); }
            set { SetData(ProdPlanApplicationTable.C_DELIVERY_DATE, value); }
        }
		
        public string DeliveryPlace
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_DELIVERY_PLACE)); }
            set { SetData(ProdPlanApplicationTable.C_DELIVERY_PLACE, value); }
        }
		
        public string DeliveryPlaceZipcode
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_DELIVERY_PLACE_ZIPCODE)); }
            set { SetData(ProdPlanApplicationTable.C_DELIVERY_PLACE_ZIPCODE, value); }
        }
		
        public string TrasportType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_TRASPORT_TYPE)); }
            set { SetData(ProdPlanApplicationTable.C_TRASPORT_TYPE, value); }
        }
		
        public string ReceivedPerson
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_RECEIVED_PERSON)); }
            set { SetData(ProdPlanApplicationTable.C_RECEIVED_PERSON, value); }
        }
		
        public string ReceivedPhone
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_RECEIVED_PHONE)); }
            set { SetData(ProdPlanApplicationTable.C_RECEIVED_PHONE, value); }
        }
		
        public string ApplicationType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_APPLICATION_TYPE)); }
            set { SetData(ProdPlanApplicationTable.C_APPLICATION_TYPE, value); }
        }
		
        public string ProductTypeId
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_PRODUCT_TYPE_ID)); }
            set { SetData(ProdPlanApplicationTable.C_PRODUCT_TYPE_ID, value); }
        }
		
        public string DeliveryType
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_DELIVERY_TYPE)); }
            set { SetData(ProdPlanApplicationTable.C_DELIVERY_TYPE, value); }
        }
		
        public decimal TotalAmount
        {
            get { return Convert.ToDecimal(GetData(ProdPlanApplicationTable.C_TOTAL_AMOUNT)); }
            set { SetData(ProdPlanApplicationTable.C_TOTAL_AMOUNT, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationTable.C_CREATED_DATE)); }
            set { SetData(ProdPlanApplicationTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_CREATED_BY)); }
            set { SetData(ProdPlanApplicationTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(ProdPlanApplicationTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_LAST_MODIFIED_BY)); }
            set { SetData(ProdPlanApplicationTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanApplicationTable.C_APPROVED_DATE)); }
            set { SetData(ProdPlanApplicationTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_APPROVED_BY)); }
            set { SetData(ProdPlanApplicationTable.C_APPROVED_BY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_STATUS)); }
            set { SetData(ProdPlanApplicationTable.C_STATUS, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(ProdPlanApplicationTable.C_REMARK)); }
            set { SetData(ProdPlanApplicationTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

